//
// Description: 
// Created by Loading on 2021/12/1.
//

#include <bits/stdc++.h>

using namespace std;

int maxPower(string s) {
    int cnt = 1;
    int max_cnt = 1;
    for (int i = 1; i < s.size(); ++i) {
        if (s[i] == s[i - 1]) {
            cnt++;
            max_cnt = max(max_cnt, cnt);
        } else {
            cnt = 1;
        }
    }

    return max_cnt;
}

int main() {
    string s = "aabbbabababdbdbdbababadddddddd";
    int res = maxPower(s);
    cout << res << endl;

    return 0;
}